<?php $this->load->view('setting/header'); ?>
<div id="wrapper" class="clearfix">
	<div id="main" class="clearfix">
		<div id="content" class="clearfix" >
			<ul id="setting-tabs">
				<li class="tab-basic"><a href="<?php echo base_url();?>setting/basic">基本设置</a></li>
				<li class="tab-interest"><a href="<?php echo base_url();?>setting/interest">兴趣爱好</a></li>
				<li class="tab-account"><a href="<?php echo base_url();?>setting/account">帐号信息</a></li>
				<li class="tab-sync"><a href="<?php echo base_url();?>setting/sync">同步动向</a></li>
				<li class="tab-notify"><a href="<?php echo base_url();?>setting/notify"">邮件通知</a></li>
				<li class="tab-privacy"><a href="<?php echo base_url();?>setting/privacy">隐私设置</a></li>
			</ul>
			<div id="setting-contents">
			<?php switch($setting_model){
				case "basic": 
					$this->load->view('setting/basic');
					break;
				case "photo":
					$this->load->view('setting/photo');					
					break;
				case "avatar":
					$this->load->view('setting/avatar');
					break;
				case "interest":
					//$this->load->view('setting/interest');
					?>
					interest
					<?php
					break;
				case "account":
					//$this->load->view('setting/account');
					?>
					account
					<?php
					break;
				case "sync":
					//$this->load->view('setting/sync');
					?>
					sync
					<?php
					break;
				case "notify":
					//$this->load->view('setting/notify');
					?>
					notify
					<?php
					break;
				case "privacy":
					//$this->load->view('setting/privacy');
					?>
					privacy
					<?php
					break;
				default:
					//$this->load->view('setting/basic');
					?>
					default
					<?php
					break;
				}
		 	?>
			</div>
		</div>
	</div>
</div>
<?php $this->load->view('mypage/footer'); ?>
<script type="text/javascript">
	$(function(){
		settingsTab();
		$("#navigator li").click(function(){
			$("#navigator .active").removeClass("active");
			$(this).addClass("active");
		});
	});
	
	
	//select Tab
	function settingsTab(){
		var curUrl=location.href.toLowerCase();
		var start=curUrl.lastIndexOf("/");
		var val=curUrl.substr(start+1,curUrl.length-start);
		
		$(".tab-"+val).addClass("active");
		if(val=="setting")
			$(".tab-basic").addClass("active");
	}	
</script>